import lib.resolver.TxtTimer;

var txtTimer;
// trace(this);

function resolve(target:MovieClip, resource, param, operation:String, seekNum)
{
	// trace("target: "+target);
	// trace("operation: "+operation);
	// trace("resource: "+resource);
	// trace("param: "+param);
	trace("txtSyncResolver was called...");
	if (txtTimer==null)
	{
		txtTimer=new TxtTimer(mlf.mcmanager.MessageAgent.getMessageDispatcher());
		txtTimer.baseTime=Number(param);
		txtTimer.parseSync(new XML(resource));
	}

	if (operation=="play")
	{
		txtTimer.forward();
	}
	else if (operation=="seek")
	{
		trace("seek: "+seekNum);
		txtTimer.seek(seekNum);
	}
	else if (operation=="close")
	{
		txtTimer.close();
		delete txtTimer;
	}
}